import unittest
import bfgalchemy.db as db
import bfgalchemy.models as model

class Tests(unittest.TestCase):

    def test_repr(self):
        model.initialize_sql("mysql://root:rootpswd@localhost/hurryoff?charset=utf8", True)
        session= db.DBSession()
        train = session.query(model.Train).join(model.Train.stops).filter(model.Train.id==1).one()
        print(train)